package com.mms.util;

	import java.text.SimpleDateFormat;

	import com.fasterxml.jackson.core.JsonProcessingException;
	import com.fasterxml.jackson.databind.ObjectMapper;

	public class JSONUtils {
		public static String toJSONString(Object object) {
			ObjectMapper objectMapper = new ObjectMapper();
			objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd"));
			try {
				return objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(object);
			} catch (JsonProcessingException e) {
				e.printStackTrace();
			}
			return "";
		}
	}
